Repository navigation
feat(nameresolving): add system resolver worker pool and factory - #3384
Merged
Merged
Conversation
This was referenced Nov 4, 2026
richard-ramos
force-pushed
the
feat/system-resolver-backend
branch
from
November 4, 2026 13:44
95975d2 to
b11fb8e
Compare
Collaborator
Author
|
/review |
Contributor
|
🔍 OpenCodeReview found 2 issue(s) in this PR.
Model: |
richard-ramos
force-pushed
the
feat/system-resolver-backend
branch
3 times, most recently
from
November 5, 2026 23:07
7aa78f4 to
c06c767
Compare
richard-ramos
marked this pull request as ready for review
November 5, 2026 23:10
vladopajic
approved these changes
Nov 6, 2026
gmelodie
approved these changes
Nov 6, 2026
richard-ramos
marked this pull request as draft
November 10, 2026 13:52
richard-ramos
marked this pull request as ready for review
November 10, 2026 13:52
richard-ramos
force-pushed
the
feat/system-resolver-backend
branch
from
November 11, 2026 13:33
6efc3d1 to
24f8026
Compare
richard-ramos
force-pushed
the
feat/system-resolver-backend
branch
from
November 11, 2026 15:37
2257983 to
4980680
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolve names through the host's OS configuration, including hosts files, localhost, and container DNS. Blocking lookups run on a lazily created worker pool; TXT queries use the system DNS servers discovered by the parent PR.
Add
newNameResolver: omitting the server list selectsSystemResolver; supplying a list selectsDnsResolver, including an empty list that returns no DNS results. Cover family filtering, concurrent lookups, cancellation, asynchronous shutdown, concurrent stops, reopening, and real switch integration.Impact on Library Users
Import
libp2p/nameresolving.newNameResolver(rng)returns aSystemResolver. The caller must await itsstop()after stopping dependent switches. Workers start lazily on first use;start()permits reuse after shutdown.newNameResolver(rng, servers)returns aDnsResolver, which requires no lifecycle calls. Passing either resolver towithNameResolverleaves ownership with the caller. A TXT resolver supplied toSystemResolver.newalso remains caller-managed: the system resolver does not start or stop it.The system resolver requires threads, and shutdown waits asynchronously for active OS lookups. Unless a TXT resolver is supplied, construction discovers TXT nameservers synchronously and can block the calling thread while reading system configuration.
Stack
2 of 3 — merge in this order:
master.feat/system-name-resolver.feat/system-resolver-backend.All three PRs are drafts. Review this diff against its parent branch.
Validation
System-resolver suite, including caller-managed lifecycle and real switch DNS dialing: 13 checks passed after rebasing.
References
Closes #3378. Continues the resolver implementation from #3114, originally authored by @nate-staked.